This page was generated from doc/documents/notebooks/solid_primitives.ipynb.
Interactive online version: Binder badge - Download notebook -

Modelling with adapy

[1]:
import ada

Solid Primitives

First lets look at the different solid primitives supported by adapy

[2]:
bm = ada.Beam('bm1', (0,0,0), (1,0,0), 'IPE300')
bm.show()
C:\Work\code\adapy\.pixi\envs\tests\Lib\site-packages\h5py\__init__.py:36: UserWarning: h5py is running against HDF5 (1, 14, 4) when it was built against (1, 14, 4, 3), this may cause problems
  _warn(("h5py is running against HDF5 {0} when it was built against {1}, "
[2]:
[3]:
pl = ada.Plate('pl1', [(0,0), (1,0), (1,1), (0,1)], 0.01)
pl.show()
[3]:
[4]:
box = ada.PrimBox("box1", (0,0,0), (1,1,1))
box.show()
[4]:
[5]:
cyl = ada.PrimCyl("cyl1", (0,0,0), (0,0,1), 0.1)
cyl.show()
[5]:
[6]:
extr = ada.PrimExtrude('extr1', [(0,0), (0.1,0), (0.05, 0.05)], 1, (0,0,1), (0,0,0), (1,0,0))
extr.show()
[6]:
[7]:
cone = ada.PrimCone('cone1', (0,0,0), (1,0,0), 0.3)
cone.show()
[7]:
[8]:
rev = ada.PrimRevolve('rev1', [(0,0), (0.1,0), (0.1,0.1), (0,0.1)], 90, (0,0,0),(1,0,0),(0,1,0))
rev.show()
[8]:
[9]:
sphere  = ada.PrimSphere('sphere1', (0,0,0), 0.3)
sphere.show()
[9]:
[10]:
sweep = ada.PrimSweep('sweep1', [(0,0,0), (0.5,0,0,0.2), (0.8, 0.8, 1),(0.8, 0.8, 2)],[(0,0), (0.1,0),(0.1,0.1),(0,0.1)], (1,0,0), (0,0,0),(0,0,1))
sweep.show()
[10]:
[12]:
pipe = ada.Pipe('pipe1', [(0,0,0), (1,0,0), (1,1,0), (1,1.5,0), (3,1.5,0)], "OD200x5")
pipe.show()
[12]: